package be.novelfaces.showcase.webdriver.pages.panel;

import be.novelfaces.component.webdriver.SourcePanel;
import be.novelfaces.showcase.webdriver.util.NFBy;
import be.novelfaces.webdriver.component.primefaces.TabContent;

public class Example2TabContent extends TabContent {

	private SourcePanel xhtmlPanel;
	private SourcePanel beanPanel;

	public SourcePanel getXhtmlPanel() {
		return xhtmlPanel;
	}

	public SourcePanel getBeanPanel() {
		return beanPanel;
	}

	public boolean isElementAPresent() {
		return isElementPresent(NFBy.mainFormId("elementsRepeat:0:element"));
	}

	public boolean isElementBPresent() {
		return isElementPresent(NFBy.mainFormId("elementsRepeat:1:element"));
	}

	public boolean isElementCPresent() {
		return isElementPresent(NFBy.mainFormId("elementsRepeat:2:element"));
	}

	@Override
	public void init() {

		xhtmlPanel = new SourcePanel(NFBy.MAIN_FORM + "example2XhtmlPanel");
		beanPanel = new SourcePanel(NFBy.MAIN_FORM + "example2BeanPanel");
	}
}
